import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'
import countView from '../views/countView.vue'
import father from '../views/father/father.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'home',
      component: () => import('../views/HomeView.vue'),
      // beforeEnter: (to, from, next) => {
      //   next()
      // }
    },
    {
      path: '/about',
      name: 'about',
      component: () => import('../views/AboutView.vue')
    },
    {
      path: '/count',
      name: 'count',
      component: countView
    },
    {
      path: '/father',
      name: 'father',
      component: father
    }, {
      path: '/echarts',
      component: () => import('../views/echarts/echarts.vue')
    },
    {
      path: '/three',
      component: () => import('../views/three/three.vue')
    }
  ]
})

export default router
